<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <script>
        let arr=[11,22,33]
        console.log(arr[0]);

        let [a,b,c,e=10]=[1,2,3];
        console.log(a);
        console.log(b);
        console.log(c);
        console.log(e);

        let person={
            name:"zhangsan",
            age:10
        }
        console.log(person.name,person.age);

        //let {x,y}=person
        // let{name,age}=person
        // console.log(name,age);

        let{age,name}=person
        console.log(age,name);

        //解构表达式应用在方法的参数列表
        function showarr([a,b,c]){
            // console.log(arr[0],arr[1],arr[2]);
            console.log(a,b,c);
        }
        showarr(arr)




    </script>
<body>
    
</body>
</html>